﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using UIBase;
using MFTool;
using MF_Base.Model;
using System.ComponentModel.Composition;
using System.Linq.Expressions;
using AutoUI.Areas.ConfigUI.Controllers;

namespace AutoUI.Areas.Sys.Controllers
{
    [Export]
    public class FormParamController : EntityFormController<FormConfig>
    {
        public ActionResult List()
        {
            ViewBag.UICode = QueryString("UICode");
            return View();
        }

        public JsonResult GetList(QueryBulider qb)
        {
            string uiCode = QueryString("UICode");
            FormConfig fc = UnitOfWork.Get<FormConfig>().FirstOrDefault(a => a.UICode == uiCode);
            fc.CheckNotNull("");
            return Json(fc.GetCtrlAttrList());
        }
    }
}